{include file="public/header" title='后台首页' keywords='关键字'}
<script src="__JS__/pintuer.js"></script>
</head>
<body>
<div class="panel admin-panel">
  <div class="panel-head"><strong class="icon-reorder"> 分类列表</strong></div>
  <table class="table table-hover text-center">
    <tr>
      <th width="5%">ID</th>
      <th width="15%">权限组名称</th>
      <th width="15%">路径</th>
      <th width="10%">是否显示</th>
      <th width="10%">是否有效</th>
      <th width="10%">操作</th>
    </tr>
    {foreach $list as $v}
    <tr>
      <td>{$v['id']}</td>
      <td>{$v['title']}</td>
      <td>{$v['name']}</td>
      <td>{$v->ifshownext|raw}</td>
      <td>{$v->statusnext|raw}</td>
      <td>
        <div class="button-group"><a class="button border-main" href="{:url('Auth/menuEdit',['id'=>$v['id']])}"><span class="icon-edit"></span> 修改</a>
          <a class="button border-red" href="javascript:del({$v['id']})"><span class="icon-trash-o"></span> 删除</a>
        </div>
      </td>
    </tr>
    {/foreach}
  </table>
</div>
<script type="text/javascript">
    function del(id, mid) {
        if (confirm("您确定要删除吗?")) {
            location.href = "menuDel?id="+id;
        }
    }
</script>
<div class="panel admin-panel margin-top">
  <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span>添加内容</strong></div>
  <div class="body-content">
    <form method="post" class="form-x" action="{:url('Auth/menuAdd')}">
      <div class="form-group">
        <div class="label">
          <label>上级权限：</label>
        </div>
        <div class="field">
          <select name="pid" class="input w50">
            <option value="0">默认加入当前权限同级</option>
            {foreach $list as $v}
            <option value="{$v['id']}">{$v['title']}</option>
            {/foreach}
            </option>
          </select>
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>权限名称：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="title" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>地址表达式：</label>
        </div>
        <div class="field">
          <input type="text" class="input w50" name="name" />
          <div class="tips"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label>其他属性：</label>
        </div>
        <div class="field" style="padding-top:8px;">
          有效  <input   type="radio" name="status"  value="1"/>
          无效<input   type="radio" name="status"  value="0" checked/>
          显示 <input   type="radio"  name="if_show" value="1"/>
          不显示 <input   type="radio"  name="if_show" value="0" checked/>
        </div>
      </div>
      <div class="form-group">
        <div class="label">
          <label></label>
        </div>
        <div class="field">
          <button class="button bg-main icon-check-square-o" type="submit"> 提交</button>
        </div>
      </div>
    </form>
  </div>
</div>
</body>
</html>